<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="{:url('doUpdatePrivilege',[$code])}">
        <ul>
            {foreach $list as $primary_key=>$primary }
            <li>
                <h3>{$primary.title}({$primary_key})</h3>
                <input type="radio" name="{$primary.code}" id="{$primary.code}_0" value="0" {if $primary.status eq 0}checked {/if}>
                <label for="{$primary.code}_0">无</label>
                <input type="radio" name="{$primary.code}" id="{$primary.code}_1" value="1" {if $primary.status eq 1}checked {/if}>
                <label for="{$primary.code}_1">有</label>
                <input type="radio" name="{$primary.code}" id="{$primary.code}_2" value="2" {if $primary.status eq 2}checked {/if}>
                <label for="{$primary.code}_2">*</label>
                <input type="radio" name="{$primary.code}" id="{$primary.code}_3" value="3" {if $primary.status eq 3}checked {/if}>
                <label for="{$primary.code}_3">+</label>
                <input type="radio" name="{$primary.code}" id="{$primary.code}_4" value="4" {if $primary.status eq 4}checked {/if}>
                <label for="{$primary.code}_4">-</label>
                <ul>
                    {foreach $primary.sub as $subprime_key=>$subprime}
                    <li>
                        <h4>{$subprime.title}({$subprime_key})</h4>
                        <input type="radio" name="{$subprime.code}" id="{$subprime.code}_0" value="0" {if $subprime.status eq 0}checked {/if}>
                        <label for="{$subprime.code}_0">无</label>
                        <input type="radio" name="{$subprime.code}" id="{$subprime.code}_1" value="1" {if $subprime.status eq 1}checked {/if}>
                        <label for="{$subprime.code}_1">有</label>
                        <input type="radio" name="{$subprime.code}" id="{$subprime.code}_2" value="2" {if $subprime.status eq 2}checked {/if}>
                        <label for="{$subprime.code}_2">*</label>
                        <input type="radio" name="{$subprime.code}" id="{$subprime.code}_3" value="3" {if $subprime.status eq 3}checked {/if}>
                        <label for="{$subprime.code}_3">+</label>
                        <input type="radio" name="{$subprime.code}" id="{$subprime.code}_4" value="4" {if $subprime.status eq 4}checked {/if}>
                        <label for="{$subprime.code}_4">-</label>
                    </li>
                    {/foreach}
                </ul>
            </li>
            {/foreach}
        </ul>
        <button type="submit">提交</button>
    </form>
</body>
</html>
